package es.ats.codington.festival.interfaces.daos;

import java.sql.Connection;
import java.util.ArrayList;
import es.ats.codington.festival.domain.Visitor;

/**
 * The Interface IVisitorDAO.
 */
public interface IVisitorDAO {
	
	/**
	 * Register visitor dao.
	 *
	 * @param con the con
	 * @param visitor the visitor
	 * @return the int
	 * @throws Exception the exception
	 */
	public int registerVisitorDAO(Connection con, Visitor visitor) throws Exception;	
	
	/**
	 * Delete visitor dao.
	 *
	 * @param con the con
	 * @param idVisitor the id visitor
	 * @return the int
	 * @throws Exception the exception
	 */
	public int deleteVisitorDAO(Connection con, int idVisitor) throws Exception;	
	
	/**
	 * Update visitor dao.
	 *
	 * @param con the con
	 * @param visitor the visitor
	 * @return the int
	 * @throws Exception the exception
	 */
	public int updateVisitorDAO(Connection con, Visitor visitor) throws Exception;	
	
	/**
	 * Search visitor dao by id.
	 *
	 * @param con the con
	 * @param idVisitor the id visitor
	 * @return the visitor
	 * @throws Exception the exception
	 */
	public Visitor searchVisitorDAOById(Connection con, int idVisitor) throws Exception;	
	
	/**
	 * Search visitor dao by username.
	 *
	 * @param con the con
	 * @param username the username
	 * @return the visitor
	 * @throws Exception the exception
	 */
	public Visitor searchVisitorDAOByUsername(Connection con, String username) throws Exception;		
	
	/**
	 * Search all visitor dao.
	 *
	 * @param con the con
	 * @return the array list
	 */
	public ArrayList<Visitor> searchAllVisitorDAO(Connection con);
}